﻿using System.Linq;

namespace StudentInfo.Security.Services
{
    public class PermissionService
    {
        public static Permission GetByName(string name)
        {
            using (var context = new StudentInfoEntities())
            {
                return context.Permissions.FirstOrDefault(s => s.PermissionName == name);
            }
        }
    }
}